<template>
  <div>
    <!-- 三级联动全局组件 -->
    <TyNav></TyNav>
    <ListContainer></ListContainer>
    <Recommend></Recommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="floor in getFloorList" :key="floor.id" :floor="floor"></Floor>
    <Brand></Brand>
  </div>
</template>

<script>
import ListContainer from '@/views/Home/ListContainer/index.vue'
import Recommend from '@/views/Home/Recommend/index.vue'
import Rank from '@/views/Home/Rank/index.vue'
import Like from '@/views/Home/Like/index.vue'
import Floor from '@/views/Home/Floor/index.vue'
import Brand from '@/views/Home/Brand/index.vue'
import { mapState } from 'vuex'
export default {
  components: {
    ListContainer,
    Recommend,
    Rank,
    Like,
    Floor,
    Brand,
  },
  created() {
    this.$store.dispatch('getFloorList')
    this.$store.dispatch('getUserInfo')
  },
  computed: {
    ...mapState({
      getFloorList: (state) => {
        return state.home.getFloorList
      },
    }),
  },
}
</script>

<style>
</style> 